<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>连续测量和记录</title>
<style type="text/css"> <!--
/***************************************************/
/* MINIMAL STYLES */
/* The following section defines styles that every HTML Help project should need. */

/* Specifies white background color for page and font style for text. */
body {background-color:#FFFFFF; font-family:Verdana, sans-serif; font-size:8pt; color: #000000;}

/* Use P for normal paragraphs. */
p { margin-top:6.00pt; margin-bottom:6.00pt; }

br { font-size:4.00pt; }

/* Use H1 for all topic headings. */
h1 { margin-top:3.00pt; margin-bottom:3.00pt; font-size:150%; font-weight:bold; }

/* Use H2 for second-level headings. */
h2 { margin-top:9.00pt; margin-bottom:3.00pt; font-size:125%; font-weight:bold; }

/* Use H3 for third-level headings. */
h3 { margin-top:6.00pt; margin-bottom:3.00pt; font-size:100%; font-weight:bold; }

/* Use H4 for fourth-level headings. */
h4 { margin-top:6.00pt; margin-bottom:3.00pt; font-size:100%; font-weight:bold; }

/* H5 and H6 have the same definition as H4 because you should not need this level of heading in one topic. If you need to use H5 or H6, consider breaking up your topic into more than one topic. */
h5 { margin-top:6.00pt; margin-bottom:3.00pt; font-size:100%; font-weight:bold; }
h6 { margin-top:6.00pt; margin-bottom:3.00pt; font-size:100%; font-weight:bold; }

/* Deprecated. Use P for normal paragraphs. */
p.Body { }

/* Use the Anchor style class for graphic references on a line by themselves. */
p.Anchor { font-size:125%; }

/* Use the Indent style classes to indent a paragraph. If you need to indent text below a list item, use <br><br> to start the new paragraph within the same set of <li></li> tags. If you need to indent a list within another list, nest the indented list within the first list's set of <ol></ol> or <ul></ul> tags. */
p.Indent1 { margin-left:12.00pt; margin-bottom:3.00pt; }
p.Indent2 { margin-left:24.00pt; margin-bottom:3.00pt; }
p.Indent3 { margin-left:36.00pt; margin-bottom:3.00pt; }
p.Indent4 { margin-left:48.00pt; margin-bottom:3.00pt; }
p.Indent5 { margin-left:60.00pt; margin-bottom:3.00pt; }

/* Use the LI style for all list items. */
li { margin-top:3.00pt; margin-bottom:3.00pt; }

/* Use the OL style for numbered lists. You do not have to type the number for each list item in a numbered list. */
ol { margin-left:22.00pt; margin-top:3.00pt; margin-bottom:3.00pt; text-indent:0pt; list-style-type: decimal; }

/* Use the OL style for numbered lists. Nested lists will use the bullet types according to the nesting scheme below */
ol ol {list-style-type:lower-alpha}
ol ol ol {list-style-type:decimal}
ol ol ol ol {list-style-type:lower-alpha}
ol ol ol ol ol {list-style-type:decimal}
ol ol ol ol ol ol {list-style-type:lower-alpha}
ol ol ol ol ol ol ol {list-style-type:decimal}
ol ol ol ol ol ol ol ol {list-style-type:lower-alpha}


/* Use the EquationNum style class for numbered lists of equations. You do not have to type the number for each list item in a numbered list. */
ol.EquationNum { margin-left:36.00pt; text-indent:0pt; list-style-type: decimal; }

/* Use the List-abc style class for lettered lists. You do not have to type the letter for each list item in a lettered list. */
ol.List-abc { margin-left:22.00pt; text-indent:0pt; list-style-type:lower-alpha; }

/* Use the UL style for bulleted lists. You do not have to type the bullet for each list item in a bulleted list. */
ul { margin-left:22.00pt; text-indent:0pt; margin-top:3.00pt; margin-bottom:3.00pt; list-style-type: disc; }

/* Use the UL style for bulleted lists. Nested lists will use the bullet types according to the nesting scheme below. */
ul ul {list-style-image: none;list-style-type: circle}
ul ul ul {list-style-image:none;list-style-type:disc}
ul ul ul ul {list-style-image: none;list-style-type: circle}
ul ul ul ul ul {list-style-image:none;list-style-type:disc}
ul ul ul ul ul ul {list-style-image: none;list-style-type: circle}
ul ul ul ul ul ul ul {list-style-image:none;list-style-type:disc}
ul ul ul ul ul ul ul ul ul{list-style-image: none;list-style-type: circle}

/* Use the List-Box style class for bulleted lists with boxes instead of bullets. You do not have to type the box for each list item in a box list. */
ul.List-Box {list-style-image: none;list-style-type: square}

table { font-size:8pt; }

/* Use the Borderless style class for tables that do not need borders, such as for 2-column or 3-column lists with no headings. */
table.Borderless { border:none; }

/* Use the Bordered style class for tables that need borders. */
table.Bordered { border-width: 1pt; border-style: solid; border-color: #000000; border-collapse: collapse; }

/* Use the TD style for table cells in Borderless or Borderless-Wide tables. */
td { vertical-align:top; padding:3px; }

/* Use the Bordered style class for table headings and cells in Bordered or Bordered-Wide tables. */
.Bordered { border-width: 1pt; border-style: solid; border-color: #000000; }

/* Use the Icon style class for table cells that contain note, caution, warning, or tip icons, or LabVIEW datatype terminals. */
td.Icon { width:40px; }

/* Use the TH style for table heading cells in Borderless or Borderless-Wide tables. */
th { font-weight:bold; padding:3px; }

/* Use the Left-Align style class for table headings and cells that you want to left align instead of center align. */
.Left-Align { text-align:left; }

/***************************************************/
/* CHARACTER FORMATS */
/* The following section defines character formats that every HTML Help project should need. */

/* CHARACTER FORMATS Updated to conform with the CSE HTML Validator Pro */
/* The following section defines character formats that every HTML Help project should need. */

/* Use the Dark-Red format for warnings or cautions. */
.Dark-Red { color: #800000 }

/* Use the Monospace format for code or syntax examples. */
.Monospace { font-family: "Courier New",monospace; font-size: 100%; }

/* Use the Monospace-Bold format for messages and responses that the computer automatically prints to the screen. */
.Monospace-Bold { font-family: "Courier New",monospace; font-weight: bold; font-size: 100%; }

/* Use the Monospace-Italic format to denote text that is a placeholder for a word or value that the user must supply. */
.Monospace-Italic { font-family: "Courier New",monospace; font-style: italic; font-size: 100%; }

/* small class */
.smallFont { font-size:87.5%; }

/* Bold class */
.Bold { font-weight: bold; }

/* Italic class */
.Italic { font-style: italic; }

/* Use the Platform format to denote a specific platform. */
.Platform { color: #0000FF; font-weight: bold; }

/* Use the Symbol format for characters not in the Verdana character set. Use this format sparingly. When possible, you should use the correct ASCII code for the symbol or use a graphic to recreate the symbol. */
.Symbol { font-family: Symbol; }

/* Use the Red-text format to call attention to text that needs information added or edited by techcomm */
.Red-text {color: #FF0000;}

/* Use the Green-Underline format for the green defintion in the conventions topic */
.Green-Underline {color: #007700; text-decoration : underline;}

/* Use the glossButton format for the glossary buttons used in the glossary topic */
.glossButton { font-size:12px; color:black; }

/* Use for text sections and hyphenated words that should not break at line wraps */
.nobreak{white-space:nowrap}

/* Use for template instructions. */
.instructions{color:red; font-style:italic}

/*Use for words and text sections that do not need to be localized */
.DNL { }

/* The following styles define the color of links. */
a:link { color: #007700 }
a:visited { color: #7F007F }
a:link:hover { color: #FF0000 }
a:link:active { color: #FF0000 }

/***************************************************/
/* Forms */

form { margin-top:0pt; margin-bottom:3pt; color:black; }
select { font-size:100%; color:black; }

/*******************************************************/
/* Margins */
/* Use these styles for block-level elements inside tables cells or list items where you do not want extra padding at the top or bottom of a cell. */
.noTopMargin { margin-top:0pt;}
.noBottomMargin { margin-bottom:0pt;}

/***************************************************/
/* CODE STYLES */
/* The following section defines styles that you need to format entire sections of code or syntax examples. If you have just a few words you need to format as a code or syntax example, use the Monospace character format. */

p.Code { margin-top:3.00pt; margin-bottom:0.00pt; font-family: "Courier New",monospace; }
p.Code1 { margin-left:12.00pt; margin-top:3.00pt; margin-bottom:0.00pt; font-family: "Courier New",monospace; }
p.Code2 { margin-left:24.00pt; margin-top:3.00pt; margin-bottom:0.00pt; font-family: "Courier New",monospace; }
p.Code3 { margin-left:36.00pt; margin-top:3.00pt; margin-bottom:0.00pt; font-family: "Courier New",monospace; }
--> </style>

<script type="text/javascript"> // define hyperlinks and function for launching a URL in a browser

function WWW(url) 
	{
	var urlWindow;
	urlWindow = window.open(url, "New", "directories=yes,location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=yes");
	}
</script>

</HEAD>
<body>

<h1>连续测量和记录</h1>

<p>&ldquo;连续测量和记录&#8221;范例项目可进行连续测量并将结果记录至磁盘。它可以并行执行5个循环：</p><ul><li>事件处理(Main.vi)－根据前面板事件生成消息的事件处理循环(EHL)。例如，用户单击<strong>开始</strong>或<strong>设置</strong>。</li>
	<li>UI消息(Main.vi)－从EHL接收消息并发送响应消息至其他MHL的消息处理循环(MHL)。</li>
	<li>采集数据(Acquisition.lvlib:Acquisition Message Loop.vi)－连续采集数据的MHL。默认情况下，该模板仿真采集数据。</li>
	<li>记录数据(Logging.lvlib:Logging Message Loop.vi)－连续记录采集数据的MHL。</li>
	<li>显示数据(Main.vi)－用采集数据更新波形图表的While循环。</li></ul><p>该范例项目还包含一个<strong>配置</strong>对话框(Settings.lvlib)，可用来配置应用程序。</p>

<h2>系统要求</h2>
<p>LabVIEW基础版、完整版或专业版开发系统。本范例项目需要和NI-DAQmx、仪器驱动程序或其他驱动软件配合使用。</p>

<h2>项目框图</h2><img src="loc_continuous_measurement.png" border="1"><h2>使用案例</h2>
<p>&ldquo;连续测量和记录&#8221;范例项目主要用于需要交互式用户界面的连续测量应用程序；即应用程序执行其他命令时，用户可以单击按钮。</p>

<h2>运行本范例项目</h2>
<ol>
	<li>在<strong>项目浏览器</strong>窗口打开并运行Main.vi。</li>
	<li>单击<strong>开始</strong>。程序开始采集仿真波形数据。</li>
	<li>单击前面板上的其他按钮，查看其他功能。</li>
</ol>

<h2>修改本范例项目</h2>

<h3>添加数据采集代码</h3>
<p>采集硬件数据前必须修改本范例项目。按照下列步骤，修改范例项目：</p>
<ol>
	<li>添加硬件引用句柄至Acquisition.lvlib:Hardware Configuration.ctl。例如，可在此处使用下列对象： <ul><li>DAQ任务</li>
		<li>DAQ通道</li>
		<li>VISA会话句柄</li></ul></li>
	<li>在Acquisition.lvlib:Initialize Hardware References.vi中添加硬件初始化代码。例如，可在此处使用下列对象： <ul><li>&ldquo;DAQmx任务名&#8221;常量</li>
			<li>&ldquo;DAQmx创建虚拟通道&#8221;VI</li>
			<li>仪器驱动程序的&ldquo;初始化&#8221;VI(Initialize.vi)</li></ul></li>
	<li>添加硬件配置代码至Acquisition.lvlib:Configure Hardware.vi。例如，可使用下列VI： <ul><li>&ldquo;DAQmx定时&#8221;VI</li>
			<li>&ldquo;DAQmx触发&#8221;VI</li>
			<li>仪器驱动程序的&ldquo;配置测量&#8221;VI(Configure Measurement.vi)</li>
			<li>仪器驱动程序的&ldquo;配置自动归零&#8221;VI(Configure Auto Zero.vi)</li></ul></li>
	<li>在Acquisition.lvlib:Acquire.vi中添加数据采集代码。例如，可在此处使用下列VI： <ul><li>&ldquo;DAQmx读取&#8221;VI</li>
			<li>仪器驱动程序的&ldquo;读取&#8221;VI(Read.vi)</li></ul></li>
	<li>在Acquisition.lvlib:Stop Acquisition.vi中添加停止数据采集的代码。例如，可在此处使用下列VI： <ul><li>&ldquo;DAQmx清除任务&#8221;VI</li>
			<li>仪器驱动程序的&ldquo;关闭&#8221;VI(Close.vi)</li></ul></li>
</ol>

<h3>自定义数据记录代码</h3>
<p>如默认记录操作无法满足应用程序需求，可按照下列方式修改本范例项目：</p><ul><li>运行Main.vi，单击<strong>设置</strong>，使用<strong>记录文件路径</strong>控件可指定记录数据的位置。默认情况下，该模板会将数据记录至<span class="Monospace"><em>LabVIEW Data</em>\Logged Data.tdms</span>，其中<span class="Monospace"><em>LabVIEW Data</em></span>为LabVIEW数据文件夹。</li>
	<li>如要修改数据记录机制，可修改Logging.lvlib:Logging Message Loop.vi。例如，可修改该VI将采集到的数据高速流入网络或磁盘。</li>
	<li>如要更改写入数据至磁盘的代码，可修改Logging.lvlib:Log Data.vi。例如，可使用导出波形至电子表格文件VI或写入电子表格文件VI。默认情况下该模板会通过TDMS函数将数据记录至<span class="Monospace">.tdms</span>文件。</li>
	<li>如需修改或添加数据记录所需的路径和文件引用句柄，可修改Logging.lvlib:Logging Configuration.ctl。</li></ul> <a name="rel_info"><h2>相关信息</h2></a><p>关于模板中使用的LabVIEW对象的详细信息和基本概念，请参考<em>LabVIEW帮助</em>。请单击<strong>帮助&raquo; LabVIEW帮助</strong>打开LabVIEW帮助。当光标移动到各个LabVIEW对象上时，<strong>即时帮助</strong>窗口中显示对象的基本信息。选择<strong>帮助&raquo;显示即时帮助</strong>，打开<strong>即时帮助</strong>窗口。</p>

<p>本范例项目以&ldquo;队列消息处理器&#8221;模板为基础。关于该模板如何运行的详细信息，见<strong>创建项目</strong>对话框中的&ldquo;队列消息处理器&#8221;模板及文档。</p>

<hr>
<h2>法律信息</h2><!--Copyright--><p><strong>版权</strong></p>
<p>&copy; 2014-2020 National Instruments.版权所有</p>

<p>根据版权法，未经National Instruments Corporation事先书面同意，本发行物不得以任何形式（包括电子或机械形式）进行全部或部分复制或传播，包括影印、录制、翻译，或储存于任何信息检索系统中。</p>

<p>NI尊重他方的知识产权，也恳请用户能给予我们同样的尊重。NI软件受版权法及其他知识产权法的保护。在将NI软件用于复制为他方所有的软件或其他资料的任何场合，NI软件仅可用于在符合许可证或其他法律限制的情况下复制上述资料。</p>

<p><strong>最终用户许可协议和第三方法律声明</strong></p>
<p>安装结束后，可在下列位置找到最终用户许可协议(EULA)和第三方法律声明：</p><ul><li>法律声明位于<span class="Monospace">&lt;National Instruments&gt;\_Legal Information</span>和<span class="Monospace">&lt;National Instruments&gt;</span>目录下。</li> 
<li>EULA位于<span class="Monospace">&lt;National Instruments&gt;\Shared\MDF\Legal\license</span>目录下。</li>
<li>如需使NI产品生成的安装程序中包含法律相关信息，请参考<span class="Monospace">&lt;National Instruments&gt;\_Legal Information.txt</span>。</li></ul><p><strong>美国政府的有限权利</strong></p>
<p>如果客户隶属于美国政府的一个机构、部门、或其他单位，则本手册所涵盖的技术信息的使用、拷贝、复制、发布、修改、披露或传递应当受到适用于民间机构的联邦采购条例52.227-14和适用于军用机构的联邦国防采购条例补充规定252.227-7014和252.227-7015中有限权利条款的约束。</p>

<p><strong>IVI Foundation版权声明</strong></p>

<p><span class="DNL">Content from the IVI specifications reproduced with permission from the IVI Foundation.</span></p>

<p><span class="DNL">The IVI Foundation and its member companies make no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The IVI Foundation and its member companies shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material.</span></p><!--Trademarks--><p><strong>商标</strong></p>

<p>关于<span class="DNL">NI</span>商标的详细信息，请访问<a href="http://www.ni.com/r/rdtrad" target="_blank"><span class="DNL">ni.com/trademarks</span></a>的<em><span class="DNL">NI Trademarks and Logo Guidelines</span></em>页面。此处提及的其他产品和公司名称均为其各自公司的商标或商业名称。</p><!--Patents--><p><strong>专利信息</strong></p>
<p>关于NI产品和技术的专利权，请查看软件中的<strong>帮助&raquo;专利信息</strong>、光盘中的<span class="Monospace">patents.txt</span>文件或者<a href="http://www.ni.com/r/rdlv17" target="_blank">ni.com/patents</a>上的<em>NI Patent Notice</em>。</p>

</body>
</html>
